home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
-
- #define MALLOCWORDS 1024
- #define NONDATASIZE 2
-
- /*
- * Type definitions
- */
-
- struct element {
- void (*func)();
- struct element *next;
- };
- typedef struct element element_t;
-
- struct float_element {
- element_t junk;
- float arg[300];
- };
- typedef struct float_element float_element_t;
-
- struct int_element {
- element_t junk;
- int arg[300];
- };
- typedef struct int_element int_element_t;
-
- /*
- * Function declarations
- */
-
- int getgrouptype(void);
- void grouptype(int type);
- void interpinit(int argc, char** argv);
- void getbounds(float* Xmin,float* Xmax,float* Ymin,float* Ymax,float* Zmin,float* Zmax);
- element_t* getinterpobj(char* filename);
- void drawinterpobj(element_t* obj);
- void setbreakfunction(void(*func)());
- void sizeofimage(char* name, int* xsize, int* ysize);
- unsigned long *readimagedata(char* name);
- void writeimagedata(char* name,unsigned long* lbuf,int xsize,int ysize);
-
- /*
- * Generic vertex command modes
- */
-
- #define GRP_POINT 0
- #define GRP_LINE 1
- #define GRP_CLOSEDLINE 2
- #define GRP_POLYGON 3
- #define GRP_TMESH 4
- #define GRP_HOLLOWPOLY 5
- #define GRP_TEXPOLY 6
- #define GRP_TEXTMESH 7
- #define GRP_SHOWDECOMP 8
-
- /*
- * Command numbers
- */
- #define ADDTOPUP 1
- #define ARC 2
- #define ARCF 3
- #define ARCFI 4
- #define ARCFS 5
- #define ARCI 6
- #define ARCS 7
- #define ATTACHCURSOR 8
- #define BACKBUFFER 9
- #define BACKFACE 10
- #define BBOX2 11
- #define BBOX2I 12
- #define BBOX2S 13
- #define BGNCLOSEDLINE 14
- #define BGNLINE 15
- #define BGNPOINT 16
- #define BGNPOLYGON 17
- #define BGNTMESH 18
- #define BLANKSCREEN 19
- #define BLANKTIME 20
- #define BLENDFUNCTION 21
- #define BLINK 22
- #define C3F 23
- #define C3I 24
- #define C3S 25
- #define C4F 26
- #define C4I 27
- #define C4S 28
- #define CALLOBJ 29
- #define CHARSTR 30
- #define CHUNKSIZE 31
- #define CIRC 32
- #define CIRCF 33
- #define CIRCFI 34
- #define CIRCFS 35
- #define CIRCI 36
- #define CIRCS 37
- #define CLEAR 38
- #define CLEARHITCODE 39
- #define CLKOFF 40
- #define CLKON 41
- #define CLOSEOBJ 42
- #define CMODE 43
- #define CMOV 44
- #define CMOV2 45
- #define CMOV2I 46
- #define CMOV2S 47
- #define CMOVI 48
- #define CMOVS 49
- #define COLOR 50
- #define COMPACTIFY 51
- #define CONCAVE 52
- #define CPACK 53
- #define CRV 54
- #define CRVN 55
- #define CURORIGIN 56
- #define CURSOFF 57
- #define CURSON 58
- #define CURSTYPE 59
- #define CURVEBASIS 60
- #define CURVEIT 61
- #define CURVEPRECISION 62
- #define CYCLEMAP 63
- #define CZCLEAR 64
- #define DBTEXT 65
- #define DEFBASIS 66
- #define DEFCURSOR 67
- #define DEFLINESTYLE 68
- #define DEFPATTERN 69
- #define DEFRASTERFONT 70
- #define DELOBJ 71
- #define DELTAG 72
- #define DEPTHCUE 73
- #define DEVPORT 74
- #define DOUBLEBUFFER 75
- #define DRAW 76
- #define DRAW2 77
- #define DRAW2I 78
- #define DRAW2S 79
- #define DRAWI 80
- #define DRAWMODE 81
- #define DRAWS 82
- #define EDITOBJ 83
- #define ENDCLOSEDLINE 84
- #define ENDFULLSCRN 85
- #define ENDLINE 86
- #define ENDPOINT 87
- #define ENDPOLYGON 88
- #define ENDTMESH 89
- #define FEEDBACK 90
- #define FINISH 91
- #define FONT 92
- #define FOREGROUND 93
- #define FREEPUP 94
- #define FRONTBUFFER 95
- #define FUDGE 96
- #define FULLSCRN 97
- #define GAMMARAMP 98
- #define GBEGIN 99
- #define GCONFIG 100
- #define GETCPOS 101
- #define GETCURSOR 102
- #define GETDEPTH 103
- #define GETDEV 104
- #define GETGPOS 105
- #define GETMATRIX 106
- #define GETMCOLOR 107
- #define GETORIGIN 108
- #define GETPORT 109
- #define GETSCRMASK 110
- #define GETSIZE 111
- #define GETTP 112
- #define GETVIEWPORT 113
- #define GEWRITE 114
- #define GEXIT 115
- #define GFLUSH 116
- #define GINIT 117
- #define GLCOMPAT 118
- #define GRESET 119
- #define GSELECT 123
- #define GSYNC 124
- #define IMAKEBACKGROUND 125
- #define INITNAMES 126
- #define KEEPASPECT 127
- #define LAMPOFF 128
- #define LAMPON 129
- #define LINEWIDTH 130
- #define LMBIND 131
- #define LMDEF 132
- #define LOADMATRIX 133
- #define LOADNAME 134
- #define LOOKAT 135
- #define LRECTWRITE 136
- #define LRGBRANGE 137
- #define LSBACKUP 138
- #define LSETDEPTH 139
- #define LSHADERANGE 140
- #define LSREPEAT 141
- #define MAKEOBJ 142
- #define MAKETAG 143
- #define MAPCOLOR 144
- #define MAPW 145
- #define MAPW2 146
- #define MAXSIZE 147
- #define MINSIZE 148
- #define MMODE 149
- #define MOVE 150
- #define MOVE2 151
- #define MOVE2I 152
- #define MOVE2S 153
- #define MOVEI 154
- #define MOVES 155
- #define MULTIMAP 156
- #define MULTMATRIX 157
- #define N3F 158
- #define NEWTAG 159
- #define NOBORDER 160
- #define NOISE 161
- #define NOPORT 162
- #define NORMAL 163
- #define OBJDELETE 164
- #define OBJINSERT 165
- #define OBJREPLACE 166
- #define ONEMAP 167
- #define ORTHO 168
- #define ORTHO2 169
- #define OVERLAY 170
- #define PAGEWRITEMASK 171
- #define PASSTHROUGH 172
- #define PATCH 173
- #define PATCHBASIS 174
- #define PATCHCURVES 175
- #define PATCHPRECISION 176
- #define PCLOS 177
- #define PDR 178
- #define PDR2 179
- #define PDR2I 180
- #define PDR2S 181
- #define PDRI 182
- #define PDRS 183
- #define PERSPECTIVE 184
- #define PICK 185
- #define PICKSIZE 186
- #define PMV 187
- #define PMV2 188
- #define PMV2I 189
- #define PMV2S 190
- #define PMVI 191
- #define PMVS 192
- #define PNT 193
- #define PNT2 194
- #define PNT2I 195
- #define PNT2S 196
- #define PNTI 197
- #define PNTS 198
- #define POLARVIEW 199
- #define POLF 200
- #define POLF2 201
- #define POLF2I 202
- #define POLF2S 203
- #define POLFI 204
- #define POLFS 205
- #define POLY 206
- #define POLY2 207
- #define POLY2I 208
- #define POLY2S 209
- #define POLYI 210
- #define POLYS 211
- #define POPATTRIBUTES 212
- #define POPMATRIX 213
- #define POPNAME 214
- #define POPVIEWPORT 215
- #define PREFPOSITION 216
- #define PREFSIZE 217
- #define PUSHATTRIBUTES 218
- #define PUSHMATRIX 219
- #define PUSHNAME 220
- #define PUSHVIEWPORT 221
- #define QDEVICE 222
- #define QENTER 223
- #define QRESET 224
- #define RCRV 225
- #define RCRVN 226
- #define RDR 227
- #define RDR2 228
- #define RDR2I 229
- #define RDR2S 230
- #define RDRI 231
- #define RDRS 232
- #define READSOURCE 233
- #define RECT 234
- #define RECTCOPY 235
- #define RECTF 236
- #define RECTFI 237
- #define RECTFS 238
- #define RECTI 239
- #define RECTS 240
- #define RECTWRITE 241
- #define RECTZOOM 242
- #define RESETLS 243
- #define RESHAPEVIEWPORT 244
- #define RGBCOLOR 245
- #define RGBCURSOR 246
- #define RGBMODE 247
- #define RGBRANGE 248
- #define RGBWRITEMASK 249
- #define RINGBELL 250
- #define RMV 251
- #define RMV2 252
- #define RMV2I 253
- #define RMV2S 254
- #define RMVI 255
- #define RMVS 256
- #define ROT 257
- #define ROTATE 258
- #define RPATCH 259
- #define RPDR 260
- #define RPDR2 261
- #define RPDR2I 262
- #define RPDR2S 263
- #define RPDRI 264
- #define RPDRS 265
- #define RPMV 266
- #define RPMV2 267
- #define RPMV2I 268
- #define RPMV2S 269
- #define RPMVI 270
- #define RPMVS 271
- #define SCALE 272
- #define SCREENSPACE 273
- #define SCRMASK 274
- #define SETBELL 275
- #define SETCURSOR 276
- #define SETDBLIGHTS 277
- #define SETDEPTH 278
- #define SETLINESTYLE 279
- #define SETMAP 280
- #define SETMONITOR 281
- #define SETPATTERN 282
- #define SETSHADE 283
- #define SETVALUATOR 284
- #define SETVIDEO 285
- #define SHADEMODEL 286
- #define SHADERANGE 287
- #define SINGLEBUFFER 288
- #define LINESMOOTH 289
- #define SPCLOS 290
- #define SPLF 291
- #define SPLF2 292
- #define SPLF2I 293
- #define SPLF2S 294
- #define SPLFI 295
- #define SPLFS 296
- #define STEPUNIT 297
- #define SWAPBUFFERS 298
- #define SWAPINTERVAL 299
- #define SWAPTMESH 300
- #define TEXTINIT 301
- #define TEXTWRITEMASK 302
- #define TIE 303
- #define TPOFF 304
- #define TPON 305
- #define TRANSLATE 306
- #define UNDERLAY 307
- #define UNQDEVICE 308
- #define V2D 309
- #define V2F 310
- #define V2I 311
- #define V2S 312
- #define V3D 313
- #define V3F 314
- #define V3I 315
- #define V3S 316
- #define V4D 317
- #define V4F 318
- #define V4I 319
- #define V4S 320
- #define VIEWPORT 321
- /*
- #define WINCLOSE 322
- */
- #define WINCONSTRAINTS 323
- #define WINDOW 324
- #define WINMOVE 325
- #define WINPOP 326
- #define WINPOSITION 327
- #define WINPUSH 328
- #define WINSET 329
- #define WINTITLE 330
- #define WMPACK 331
- #define WRITEMASK 332
- #define WRITEPIXELS 333
- #define WRITERGB 334
- #define XFPT 335
- #define XFPT2 336
- #define XFPT2I 337
- #define XFPT2S 338
- #define XFPT4 339
- #define XFPT4I 340
- #define XFPT4S 341
- #define XFPTI 342
- #define XFPTS 343
- #define ZBUFFER 344
- #define ZCLEAR 345
- #define ZDRAW 346
- #define ZFUNCTION 347
- #define ZSOURCE 348
- #define ZWRITEMASK 349
- #define BGNGROUP 350
- #define ENDGROUP 351
- #define GROUPTYPE 352
- #define RN3F 353
- #define FRONTFACE 354
- #define SUBPIXEL 355
- #define PNTSMOOTH 356
- #define HOLLOWCOLOR 357
- #define HOLLOWWIDTH 358
- #define SBOX 360
- #define SBOXF 361
- #define T2F 362
- #define SCRSUBDIVIDE 363
- #define LOGICOP 364
-
- #define TEXFOGVERTEX 366
- #define FGINIT 367
- #define TEXDEF 368
- #define TEXBIND 369
- #define TEVDEF 370
- #define TEVBIND 371
- #define TEXCONTOUR 372
- #define TEXSCALE 373
- #define COLORF 374
- #define LMCOLOR 375
- #define ACBUF 377
- #define ACSIZE 378
- #define AFUNCTION 379
- #define BGNQSTRIP 380
- #define ENDQSTRIP 381
- #define CLIPPLANE 382
- #define FOGVERTEX 383
- #define GETSCRBOX 384
- #define MSWAPBUFFERS 385
- #define NMODE 386
- #define PIXMODE 387
- #define POLYMODE 388
- #define POLYSMOOTH 389
- #define SCLEAR 390
- #define SCRBOX 391
- #define STENCIL 392
- #define STENSIZE 393
- #define SWRITEMASK 394
- #define TEXDEF2D TEXDEF
- #define TEXGEN 395
- #define POLYIMAGE 396
- #define PNTSIZE 397
- #define BOX 398
- #define DISPLACEPOLYGON 399
-